<?
	include "db.php";
	$q = "show tables from $db";
	$rs = mysql_query($q);
	//$query = "SHOW columns FROM your-table";

	while(($result = mysql_fetch_row($rs))) {
		echo "<h3>$result[0]</h3><br />";
		$query = "SHOW columns FROM $result[0]";
		$result1 = mysql_query($query);
		for($i = 0; $i < mysql_num_rows($result1); $i++)
		{
			$rows = mysql_fetch_array($result1);
			echo $rows[0]."<br />";
		}
	}
?>
